package com.metaera.app.data.model;

import com.chad.library.adapter.base.entity.MultiItemEntity;

public class ArticleListResponse implements MultiItemEntity {
    public final static int CONTENT_TYPE = 1, DATE_TYPE = 2;

    private int itemType = CONTENT_TYPE;
    
   private int score;

    private int is_like;
    private int id;
    private int author_id;
    private String  title;
    private String  illustrate;

    private String content;
    private String  pic;
    private String  create_date;
    private String  start_time;
    private String  end_time;
    private String  release_time;
    private int like_num;
    private int deny_num;
    private int is_deny;
    private int release_time_stamp;
    private Author  author;

    public int getIs_deny() {
        return is_deny;
    }

    public void setIs_deny(int is_deny) {
        this.is_deny = is_deny;
    }

    public int getIs_like() {
        return is_like;
    }

    public void setIs_like(int is_like) {
        this.is_like = is_like;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getContent() {
        if (content == null){
            return "";
        }
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getAuthor_id() {
        return author_id;
    }

    public void setAuthor_id(int author_id) {
        this.author_id = author_id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIllustrate() {
        return illustrate;
    }

    public void setIllustrate(String illustrate) {
        this.illustrate = illustrate;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getCreate_date() {
        return create_date;
    }

    public void setCreate_date(String create_date) {
        this.create_date = create_date;
    }

    public String getStart_time() {
        return start_time;
    }

    public void setStart_time(String start_time) {
        this.start_time = start_time;
    }

    public String getEnd_time() {
        return end_time;
    }

    public void setEnd_time(String end_time) {
        this.end_time = end_time;
    }

    public String getRelease_time() {
        return release_time;
    }

    public void setRelease_time(String release_time) {
        this.release_time = release_time;
    }

    public int getLike_num() {
        return like_num;
    }

    public void setLike_num(int like_num) {
        this.like_num = like_num;
        if (this.like_num < 0){
            this.like_num = 0;
        }
    }

    public int getDeny_num() {
        if (deny_num < 0){
            return 0;
        }
        return deny_num;
    }

    public void setDeny_num(int deny_num) {
        this.deny_num = deny_num;
        if (this.deny_num < 0){
            this.deny_num = 0;
        }
    }

    public int getRelease_time_stamp() {
        return release_time_stamp;
    }

    public void setRelease_time_stamp(int release_time_stamp) {
        this.release_time_stamp = release_time_stamp;
    }

    public Author getAuthor() {
        if (author == null){
            return new Author();
        }

        return author;
    }

    public void setAuthor(Author author) {
        this.author = author;
    }

    @Override
    public int getItemType() {
        return itemType;
    }

    public void setItemType(int itemType) {
        this.itemType = itemType;
    }

    public static class Author {
        private int id;
        private String  mobile;
        private String  nickname;
        private String  avatar_img;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getNickname() {
            if (nickname == null){
                return "null";
            }
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getAvatar_img() {
            return avatar_img;
        }

        public void setAvatar_img(String avatar_img) {
            this.avatar_img = avatar_img;
        }
    }


}
